package com.hice.demo.springboot.jta.service.impl;

import com.hice.demo.springboot.jta.dao.databases2.MessageMapper;
import com.hice.demo.springboot.jta.model.Message;
import com.hice.demo.springboot.jta.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by hyson on 2017/3/10.
 */
@Service
@Transactional
public class MessageServiceImpl implements MessageService {
    @Autowired
    MessageMapper messageMapper;

    @Override
    public Integer add(Message message) throws Exception  {
        return messageMapper.add(message);
    }

    @Override
    public Integer del(Long id) throws Exception {
        return messageMapper.del(id);
    }
}